package com.ugoodtech.mdcc.core.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;

@ApiModel("技术颜色能力报告-改")
@Entity
@Table(name = "station_color_report")
public class StationColorReport extends BaseEntity {

    @ApiModelProperty("报告的唯一ID")
    private String reportId;

    @ApiModelProperty("问题ID")
    private Long questionId;

    @ApiModelProperty("答案ID")
    private String answerId;

    @ApiModelProperty("文本框答案")
    private String answerOther;

    @ApiModelProperty("附带照片")
    private String answerPhoto;

    @ApiModelProperty("是否是新的")
    private boolean is_new = false;

    @ApiModelProperty("对应的报告")
    private StationReport stationReport;

    @Column(name = "report_id", insertable = false, updatable = false)
    public Long getReportIdNotReport() {
        return reportIdNotReport;
    }

    public void setReportIdNotReport(Long reportIdNotReport) {
        this.reportIdNotReport = reportIdNotReport;
    }

    private Long reportIdNotReport;

    public StationColorReport(){}

    public StationColorReport(AuditColorReport auditColorReport){
        this.questionId=auditColorReport.getQuestionId();
        this.answerId=auditColorReport.getAnswerId();
        this.answerOther=auditColorReport.getAnswerOther();
        this.answerPhoto=auditColorReport.getAnswerPhoto();
    }


    @Column(name = "question_id")
    public Long getQuestionId() {
        return questionId;
    }

    @Column(name = "report")
    public String getReportId() {
        return reportId;
    }

    public void setReportId(String reportId) {
        this.reportId = reportId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    @Column(name = "answer_id")
    public String getAnswerId() {
        return answerId;
    }

    public void setAnswerId(String answerId) {
        this.answerId = answerId;
    }

    @Column(name = "answer_other_id")
    public String getAnswerOther() {
        return answerOther;
    }

    public void setAnswerOther(String answerOther) {
        this.answerOther = answerOther;
    }

    @Column(name = "photo")
    public String getAnswerPhoto() {
        return answerPhoto;
    }

    public void setAnswerPhoto(String answerPhoto) {
        this.answerPhoto = answerPhoto;
    }

    @JsonIgnore
    @Column(name = "is_new")
    public boolean isIs_new() {
        return is_new;
    }

    public void setIs_new(boolean is_new) {
        this.is_new = is_new;
    }

    @JsonIgnore
    @ManyToOne
    @JoinColumn(name = "report_id")
    public StationReport getStationReport() {
        return stationReport;
    }

    public void setStationReport(StationReport stationReport) {
        this.stationReport = stationReport;
    }

}
